//
//  APPublishWorksImageCell.m
//  AqualPolo
//
//  Created by dong on 2024/5/12.
//

#import "APPublishWorksImageCell.h"

@implementation APPublishWorksAddImageCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = LYRGBColor(18, 23, 78);
        self.contentView.layer.cornerRadius = 8;
        self.contentView.layer.masksToBounds = true;
        UIImageView *imageView = [[UIImageView alloc] init];
        imageView.image = [UIImage imageNamed:@"publish_add_image_icon"];
        [self.contentView addSubview:imageView];
        [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self.contentView);
            make.size.mas_equalTo(CGSizeMake(22, 20));
        }];
    }
    return self;
}

@end

@implementation APPublishWorksImageCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = LYRGBColor(18, 23, 78);
        self.contentView.layer.cornerRadius = 8;
        self.contentView.layer.masksToBounds = true;
        _imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageView];
        [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView);
        }];
        
        _deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_deleteButton setBackgroundImage:[UIImage imageNamed:@"publish_image_delete_icon"] forState:UIControlStateNormal];
        [self.contentView addSubview:_deleteButton];
        [_deleteButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.right.equalTo(self.contentView);
        }];
    }
    return self;
}
@end
